gradunwarp


Gradient Unwarping Package for Numpy/Python

Gradient Unwarping Package for Numpy/Python

Goal

To correct for image distortions in MRI data due to non-linearity of the magnetic fields from the imaging gradient coils.

Method described in

Jovicich J, Czanner S, Greve D, Haley E, Kouwe A, Gollub R, Kennedy D, Schmitt F, Brown G, MacFall J, Fischl B, Dale A. Reliability in Multi-Site Structural MRI Studies: Effects of Gradient Non-linearity Correction on Phantom and Human Data. NeuroImage NeuroImage (Apr 1;30(2):436-43, 2006)

Outline of steps involved

  • Obtain from your local Siemens or GE vendor the spherical harmonics expansion that represents the gradient coils used in the MRI system you want to correct. This is a text file with proprietary information.

  • We provide a script (gradient_unwarp_converter.pl ) that reads the spherical harmonics text file and writes out the coefficients in a standard format (for example, avanto.coef).

  • The create_displacement_table.py python script reads in the standard formatted coefficients (e.g., avanto.coef) of your system and writes out a file that has the tables for displacements along the x,y,z axes and also the intensity correction table due to voxel size distortion (e.g., avanto.gwv). See CreateDisplacementTable

  • The gradient_unwarp.py python script reads in the correction tables of your system and the mgh or dicom image volume you want to correct and writes out the distortion corrected mgh volume. See GradientUnwarping

How to Read the Documentation

  • Start with Requirements on what all software you need to install.

  • Read Installation on how to install the Scipy package ( It has a few more tips on installing gradunwarp as well)

  • Read GradunwarpInstallation for generic instructions of how to install gradunwarp ( mainly in MacOSX and Linux )

  • Skim through Limitations to see whether any of the issues apply to you.

  • Read Usage and the pages it points to read about how to use gradunwarp.

Project Information